//js 数组从0开始  一个国家的不同名字 长的放前面
var geoArray = [

["Angola"                               ,"AO"],
["Afghanistan"                          ,"AF"],
["Albania"                              ,"AL"],
["Algeria"                              ,"DZ"],
["Andorra"                              ,"AD"],
["Anguilla"                             ,"AI"],
["Antigua and Barbuda"                  ,"AG"],
["Argentina"                            ,"AR"],
["Armenia"                              ,"AM"],
["Australia"                            ,"AU"],
["Austria"                              ,"AT"],
["Azerbaijan"                           ,"AZ"],
["Bahamas"                              ,"BS"],
["Bahrain"                              ,"BH"],
["Bangladesh"                           ,"BD"],
["Barbados"                             ,"BB"],
["Belarus"                              ,"BY"],
["Belgium"                              ,"BE"],
["Belize"                               ,"BZ"],
["Benin"                                ,"BJ"],
["Bolivia"                              ,"BO"],
["Botswana"                             ,"BW"],
["Brazil"                               ,"BR"],
["Brunei"                               ,"BN"],
["Bulgaria"                             ,"BG"],
["Burkina faso"                         ,"BF"],
["Burkina-faso"                         ,"BF"],
["Bermuda Is."                          ,"BM"],
["BermudaIs."                           ,"BM"],
["Bermuda"                              ,"BM"],                                       
["Bhutan"                               ,"BT"],
["Burma"                                ,"MM"],
["Burundi"                              ,"BI"],
["Cameroon"                             ,"CM"],
["Canada"                               ,"CA"],
["Central African Republic"             ,"CF"],
["Chad"                                 ,"TD"],
["Chile"                                ,"CL"],
["China"                                ,"CN"],
["Colombia"                             ,"CO"],
["the Democratic Republic of the Congo" ,"CG"],
["Congo"                                ,"CG"],
["Cambodia"                             ,"KH"],
["Costa Rica"                           ,"CR"],
["Cuba"                                 ,"CU"],
["Cyprus"                               ,"CY"],
["Czech Republic"                       ,"CZ"],
["Cook Islands"                         ,"CK"],
["Cook Island"                          ,"CK"],
["Cook Is."                             ,"CK"],
["Denmark"                              ,"DK"],
["Djibouti"                             ,"DJ"],
["Dominica Rep."                        ,"DO"],
["Ecuador"                              ,"EC"],
["Egypt"                                ,"EG"],
["EISalvador"                           ,"SV"],
["Estonia"                              ,"EE"],
["Ethiopia"                             ,"ET"],
["Fiji"                                 ,"FJ"],
["Finland"                              ,"FI"],
["France"                               ,"FR"],
["French Guiana"                        ,"GF"],
["Gabon"                                ,"GA"],
["Gambia"                               ,"GM"],
["Georgia"                              ,"GE"],
["Germany"                              ,"DE"],
["Ghana"                                ,"GH"],
["Gibraltar"                            ,"GI"],
["Greece"                               ,"GR"],
["Grenada"                              ,"GD"],
["Guam"                                 ,"GU"],
["Guatemala"                            ,"GT"],
["Guinea"                               ,"GN"],
["Guyana"                               ,"GY"],
["Haiti"                                ,"HT"],
["Honduras"                             ,"HN"],
["Hongkong"                             ,"HK"],
["Hong Kong"                            ,"HK"],
["Hungary"                              ,"HU"],
["Iceland"                              ,"IS"],
["India"                                ,"IN"],
["Indonesia"                            ,"ID"],
["Iran] Islamic Republic of Iran"       ,"IR"],
["Islamic Republic of Iran"             ,"IR"],
["Iran"                                 ,"IR"],
["Iraq"                                 ,"IQ"],
["Ireland"                              ,"IE"],
["Israel"                               ,"IL"],
["Italy"                                ,"IT"],
["Republic of Ivory Coast"              ,"KT"],	
["IvoryCoast"                           ,"KT"],
["Ivory Coast"                          ,"KT"],
["Jamaica"                              ,"JM"],
["Japan"                                ,"JP"],
["Jordan"                               ,"JO"],
["Kazakstan"                            ,"KZ"],
["Kenya"                                ,"KE"],
["Korea"                                ,"KR"],
["Kuwait"                               ,"KW"],
["Kyrgyzstan"                           ,"KG"],
["Kampuchea"                            ,"KH"],
["Laos"                                 ,"LA"],
["Latvia"                               ,"LV"],
["Lebanon"                              ,"LB"],
["Lesotho"                              ,"LS"],
["Liberia"                              ,"LR"],
["Libya"                                ,"LY"],
["Liechtenstein"                        ,"LI"],
["Lithuania"                            ,"LT"],
["Luxembourg"                           ,"LU"],
["Macao"                                ,"MO"],
["Madagascar"                           ,"MG"],
["Malawi"                               ,"MW"],
["Montserrat Islands"                   ,"MS"],
["Montserrat Island"                    ,"MS"],
["Montserrat Is"                        ,"MS"],
["Montserrat"                           ,"MS"],
["Malaysia"                             ,"MY"],
["Maldives"                             ,"MV"],
["Mali"                                 ,"ML"],
["Malta"                                ,"MT"],
["Mauritius"                            ,"MU"],
["Mauritania"                           ,"MR"],
["Mexico"                               ,"MX"],
["Moldova]Republic of"                  ,"MD"],
["Monaco"                               ,"MC"],
["Mongolia"                             ,"MN"],
["Morocco"                              ,"MA"],
["Mozambique"                           ,"MZ"],
["Myanmar"                              ,"MM"],
["Namibia"                              ,"NA"],
["New Zealand"                          ,"NZ"],
["NewZealand"                           ,"NZ"],
["Nauru"                                ,"NR"],
["Nepal"                                ,"NP"],
["Netherlands"                          ,"NL"],
["Nicaragua"                            ,"NI"],
["Niger"                                ,"NE"],
["Nigeria"                              ,"NG"],
["North Korea"                          ,"KP"],
["Norway"                               ,"NO"],
["Oman"                                 ,"OM"],
["Pakistan"                             ,"PK"],
["Panama"                               ,"PA"],
["Papua New Cuinea"                     ,"PG"],
["Paraguay"                             ,"PY"],
["Peru"                                 ,"PE"],
["Philippines"                          ,"PH"],
["Poland"                               ,"PL"],
["French Polynesia"                     ,"PF"],
["Portugal"                             ,"PT"],
["PuertoRico"                           ,"PR"],
["Qatar"                                ,"QA"],
["Romania"                              ,"RO"],
["Russian Federation"                   ,"RU"],
["Russia"                               ,"RU"],
["Saint Lueia"                          ,"LC"],
["Saint Vincent"                        ,"VC"],
["San Marino"                           ,"SM"],
["Sao Tome and Principe"                ,"ST"],
["Saudi Arabia"                         ,"SA"],
["Senegal"                              ,"SN"],
["Seychelles"                           ,"SC"],
["Sierra Leone"                         ,"SL"],
["Singapore"                            ,"SG"],
["Slovakia"                             ,"SK"],
["Slovenia"                             ,"SI"],
["Solomon Islands"                      ,"SB"],
["Solomon Is"                           ,"SB"],
["Somalia"                              ,"SO"],
["Somali"                               ,"SO"],
["South Africa"                         ,"ZA"],
["Spain"                                ,"ES"],
["Sri Lanka"                            ,"LK"],
["St.Lucia"                             ,"LC"],
["St.Vincent"                           ,"VC"],
["Sudan"                                ,"SD"],
["Suriname"                             ,"SR"],
["Swaziland"                            ,"SZ"],
["Sweden"                               ,"SE"],
["Switzerland"                          ,"CH"],
["Syria"                                ,"SY"],
["Taiwan"                               ,"TW"],
["Tajikistan"                           ,"TJ"],
["Tajikstan"                            ,"TJ"],
["Tanzania"                             ,"TZ"],
["Thailand"                             ,"TH"],
["Togo"                                 ,"TG"],
["Tonga"                                ,"TO"],
["Trinidad and Tobago"                  ,"TT"],
["Timor-Leste"                          ,"TL"],
["Tunisia"                              ,"TN"],
["Turkey"                               ,"TR"],
["Turkmenistan"                         ,"TM"],
["Uganda"                               ,"UG"],
["Ukraine"                              ,"UA"],
["United Arab Emirates"                 ,"AE"],
["United Kiongdom"                      ,"GB"],
["United Kingdom"                       ,"GB"],
["United States of America"             ,"US"],
["United States"                        ,"US"],
["U.S."                                 ,"US"],
["U.S"                                  ,"US"],
["Uruguay"                              ,"UY"],
["Uzbekistan"                           ,"UZ"],
["United Republic of Tanzania"          ,"TZ"],
["Venezuela"                            ,"VE"],
["Vietnam"                              ,"VN"],
["Viet nam"                             ,"VN"],
["Viet Nam"                             ,"VN"],
["Yemen"                                ,"YE"],
["Yugoslavia"                           ,"YU"],
["South Africa"                         ,"ZA"],
["Zimbabwe"                             ,"ZW"],
["Zaire"                                ,"ZR"],
["Zambia"                               ,"ZM"],


]


geoConversion  = function()
{
	var f = document.getElementById("geoForm-geos").value;

	var len = geoArray.length
	for (i=0; i<len; i++)
	{
		f = f.replace(geoArray[i][0], geoArray[i][1])
	}

	alert(f)
}





